package org.example.service;

import javax.annotation.PostConstruct;
import javax.annotation.PreDestroy;

public interface PaymentService {
    void pay(String orderId);
    void additionalPaymentProcessing(String orderId);  // 各支付方式的额外处理

    @PostConstruct
    default void init() {
        System.out.println("Initializing payment service");
    }

    @PreDestroy
    default void destroy() {
        System.out.println("Destroying payment service");
    }
}